package com.qingsong.dto;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import io.swagger.v3.oas.annotations.media.Schema;
import org.hibernate.validator.constraints.Range;
import javax.validation.constraints.Size;

/**
 * @author qingsong
 */
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Schema(name = "菜单分页DTO")
@Data
public class MenuPageDTO extends PageDTO {
    @Range(min = 0,message ="父菜单主键最小为0")
    @Schema(description = "父菜单主键，0视为根节点")
    private Long pid;

    @Size(min = 1,max = 42,message ="标题长度必须在1~42之间")
    @Schema(description = "标题")
    private String title;
}